#include<iostream>

using namespace std;

int main() {
	int c1=0, c2=0, c3=0, x;
	while (true)
	{
		cin >> x;
		if (x < 0)break;

		if (x >= 0 && x <= 12)c1++;
		else if (x > 12 && x <= 15)c2++;
		else if (x > 15)c3++;
	}
	cout << c1 << endl;
	cout << c2 << endl;
	cout << c3 << endl;

	return 0;
}